package com.briup.app04.service.impl;

import com.briup.app04.bean.Cms_category;
import com.briup.app04.dao.Cms_categoryMapper;
import com.briup.app04.service.ICms_categoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class Cms_categoryServiceImpl implements ICms_categoryService {
    @Resource
    private Cms_categoryMapper cms_categoryMapper;
    @Override
    public List<Cms_category> findAll() {
        List<Cms_category> list=cms_categoryMapper.selectAll();
        if (list == null)
            System.out.println("List is null");
        else
            System.out.println(list.toString());
        return list;
    }

    @Override
    public void save(Cms_category cms_category) {
        cms_categoryMapper.insert(cms_category);
    }

    @Override
    public void update(Cms_category cms_category) {
        cms_categoryMapper.update(cms_category);
    }

    @Override
    public void deleteById(long id) {

        cms_categoryMapper.deleteById(id);
    }


}
